package myException;

import java.util.Scanner;

/*
自定义异常
 */
public class Test4 {
    public static void main(String[] args) throws EightException {
        int a = new Scanner(System.in).nextInt();
        if (a == 8) throw new EightException("输入是8");
    }
}

class EightException extends Exception {
    public EightException() {
    }

    public EightException(String msg) {
        super(msg);
    }
}